#include "../comm.h"
#include <iostream>
class Solution {
public:
    int distributeCandies(vector<int>& candyType) {
        unordered_set<int> s;
        for (auto e : candyType) s.insert(e);
        return min(s.size(), candyType.size() / 2);
    }
};